package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:02 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductRequirementBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductRequirement productRequirement;

  protected BeanMap getBeanMap() {

    return new BeanMap(productRequirement);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductRequirementDAO.Id);

    mappedDaoFields.put(
        "productDefineId",
        com.ourteam.product.requirement.dao.IProductRequirementDAO.ProductDefineId);

    mappedDaoFields.put(
        "parentId", com.ourteam.product.requirement.dao.IProductRequirementDAO.ParentId);

    mappedDaoFields.put(
        "requestType", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestType);

    mappedDaoFields.put(
        "requestCode", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestCode);

    mappedDaoFields.put(
        "requestName", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestName);

    mappedDaoFields.put(
        "requestContent",
        com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestContent);

    mappedDaoFields.put(
        "requestLevel", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestLevel);

    mappedDaoFields.put(
        "requestRisk", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestRisk);

    mappedDaoFields.put(
        "proposerDate", com.ourteam.product.requirement.dao.IProductRequirementDAO.ProposerDate);

    mappedDaoFields.put(
        "proposerId", com.ourteam.product.requirement.dao.IProductRequirementDAO.ProposerId);

    mappedDaoFields.put(
        "creatorId", com.ourteam.product.requirement.dao.IProductRequirementDAO.CreatorId);

    mappedDaoFields.put(
        "createDate", com.ourteam.product.requirement.dao.IProductRequirementDAO.CreateDate);

    mappedDaoFields.put(
        "lastEditorId", com.ourteam.product.requirement.dao.IProductRequirementDAO.LastEditorId);

    mappedDaoFields.put(
        "lastEditDate", com.ourteam.product.requirement.dao.IProductRequirementDAO.LastEditDate);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductRequirementDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductRequirementDAO.Remarks);

    mappedDaoFields.put(
        "creatorName", com.ourteam.product.requirement.dao.IProductRequirementDAO.CreatorName);

    mappedDaoFields.put(
        "lastEditorName",
        com.ourteam.product.requirement.dao.IProductRequirementDAO.LastEditorName);

    mappedDaoFields.put(
        "proposerName", com.ourteam.product.requirement.dao.IProductRequirementDAO.ProposerName);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductRequirementDAO.SortIndex);

    mappedDaoFields.put(
        "indent", com.ourteam.product.requirement.dao.IProductRequirementDAO.Indent);

    mappedDaoFields.put(
        "precondition", com.ourteam.product.requirement.dao.IProductRequirementDAO.Precondition);

    mappedDaoFields.put(
        "requestTrigger",
        com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestTrigger);

    mappedDaoFields.put(
        "requestKind", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestKind);

    mappedDaoFields.put(
        "requestSource", com.ourteam.product.requirement.dao.IProductRequirementDAO.RequestSource);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductRequirementBean() {
    super();

    this.productRequirement = new com.ourteam.product.requirement.dao.ProductRequirement();
  }

  public ProductRequirementBean(
      com.ourteam.product.requirement.dao.ProductRequirement productRequirement) {
    super();

    this.productRequirement = productRequirement;
  }

  public com.ourteam.product.requirement.dao.ProductRequirement convertToProductRequirement() {
    return this.productRequirement;
  }

  public com.ourteam.product.requirement.dao.ProductRequirement convertTo() {
    return this.productRequirement;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productRequirement.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productRequirement.setId(id);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productRequirement.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productRequirement.setProductDefineId(productDefineId);
  }

  /**
   * Get parentId
   *
   * @return long
   */
  public long getParentId() {
    return (long) this.productRequirement.getParentId();
  }

  /**
   * Set parentId
   *
   * @parameter long
   */
  public void setParentId(long parentId) {

    this.productRequirement.setParentId(parentId);
  }

  /**
   * Get requestType
   *
   * @return String
   */
  public String getRequestType() {
    return (String) this.productRequirement.getRequestType();
  }

  /**
   * Set requestType
   *
   * @parameter String
   */
  public void setRequestType(String requestType) {

    this.productRequirement.setRequestType(requestType);
  }

  /**
   * Get requestCode
   *
   * @return String
   */
  public String getRequestCode() {
    return (String) this.productRequirement.getRequestCode();
  }

  /**
   * Set requestCode
   *
   * @parameter String
   */
  public void setRequestCode(String requestCode) {

    this.productRequirement.setRequestCode(requestCode);
  }

  /**
   * Get requestName
   *
   * @return String
   */
  public String getRequestName() {
    return (String) this.productRequirement.getRequestName();
  }

  /**
   * Set requestName
   *
   * @parameter String
   */
  public void setRequestName(String requestName) {

    this.productRequirement.setRequestName(requestName);
  }

  /**
   * Get requestContent
   *
   * @return String
   */
  public String getRequestContent() {
    return (String) this.productRequirement.getRequestContent();
  }

  /**
   * Set requestContent
   *
   * @parameter String
   */
  public void setRequestContent(String requestContent) {

    this.productRequirement.setRequestContent(requestContent);
  }

  /**
   * Get requestLevel
   *
   * @return String
   */
  public String getRequestLevel() {
    return (String) this.productRequirement.getRequestLevel();
  }

  /**
   * Set requestLevel
   *
   * @parameter String
   */
  public void setRequestLevel(String requestLevel) {

    this.productRequirement.setRequestLevel(requestLevel);
  }

  /**
   * Get requestRisk
   *
   * @return String
   */
  public String getRequestRisk() {
    return (String) this.productRequirement.getRequestRisk();
  }

  /**
   * Set requestRisk
   *
   * @parameter String
   */
  public void setRequestRisk(String requestRisk) {

    this.productRequirement.setRequestRisk(requestRisk);
  }

  /**
   * Get proposerDate
   *
   * @return java.util.Date
   */
  public java.util.Date getProposerDate() {
    return (java.util.Date) this.productRequirement.getProposerDate();
  }

  /**
   * Set proposerDate
   *
   * @parameter java.util.Date
   */
  public void setProposerDate(java.util.Date proposerDate) {

    this.productRequirement.setProposerDate(proposerDate);
  }

  /**
   * Get proposerId
   *
   * @return long
   */
  public long getProposerId() {
    return (long) this.productRequirement.getProposerId();
  }

  /**
   * Set proposerId
   *
   * @parameter long
   */
  public void setProposerId(long proposerId) {

    this.productRequirement.setProposerId(proposerId);
  }

  /**
   * Get creatorId
   *
   * @return long
   */
  public long getCreatorId() {
    return (long) this.productRequirement.getCreatorId();
  }

  /**
   * Set creatorId
   *
   * @parameter long
   */
  public void setCreatorId(long creatorId) {

    this.productRequirement.setCreatorId(creatorId);
  }

  /**
   * Get createDate
   *
   * @return java.util.Date
   */
  public java.util.Date getCreateDate() {
    return (java.util.Date) this.productRequirement.getCreateDate();
  }

  /**
   * Set createDate
   *
   * @parameter java.util.Date
   */
  public void setCreateDate(java.util.Date createDate) {

    this.productRequirement.setCreateDate(createDate);
  }

  /**
   * Get lastEditorId
   *
   * @return long
   */
  public long getLastEditorId() {
    return (long) this.productRequirement.getLastEditorId();
  }

  /**
   * Set lastEditorId
   *
   * @parameter long
   */
  public void setLastEditorId(long lastEditorId) {

    this.productRequirement.setLastEditorId(lastEditorId);
  }

  /**
   * Get lastEditDate
   *
   * @return java.util.Date
   */
  public java.util.Date getLastEditDate() {
    return (java.util.Date) this.productRequirement.getLastEditDate();
  }

  /**
   * Set lastEditDate
   *
   * @parameter java.util.Date
   */
  public void setLastEditDate(java.util.Date lastEditDate) {

    this.productRequirement.setLastEditDate(lastEditDate);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productRequirement.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productRequirement.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productRequirement.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productRequirement.setRemarks(remarks);
  }

  /**
   * Get creatorName
   *
   * @return String
   */
  public String getCreatorName() {

    return (String) this.productRequirement.getCreatorName();
  }

  /**
   * Get lastEditorName
   *
   * @return String
   */
  public String getLastEditorName() {

    return (String) this.productRequirement.getLastEditorName();
  }

  /**
   * Get proposerName
   *
   * @return String
   */
  public String getProposerName() {

    return (String) this.productRequirement.getProposerName();
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productRequirement.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productRequirement.setSortIndex(sortIndex);
  }

  /**
   * Get indent
   *
   * @return int
   */
  public int getIndent() {
    return (int) this.productRequirement.getIndent();
  }

  /**
   * Set indent
   *
   * @parameter int
   */
  public void setIndent(int indent) {

    this.productRequirement.setIndent(indent);
  }

  /**
   * Get precondition
   *
   * @return String
   */
  public String getPrecondition() {
    return (String) this.productRequirement.getPrecondition();
  }

  /**
   * Set precondition
   *
   * @parameter String
   */
  public void setPrecondition(String precondition) {

    this.productRequirement.setPrecondition(precondition);
  }

  /**
   * Get requestTrigger
   *
   * @return String
   */
  public String getRequestTrigger() {
    return (String) this.productRequirement.getRequestTrigger();
  }

  /**
   * Set requestTrigger
   *
   * @parameter String
   */
  public void setRequestTrigger(String requestTrigger) {

    this.productRequirement.setRequestTrigger(requestTrigger);
  }

  /**
   * Get requestKind
   *
   * @return String
   */
  public String getRequestKind() {
    return (String) this.productRequirement.getRequestKind();
  }

  /**
   * Set requestKind
   *
   * @parameter String
   */
  public void setRequestKind(String requestKind) {

    this.productRequirement.setRequestKind(requestKind);
  }

  /**
   * Get requestSource
   *
   * @return String
   */
  public String getRequestSource() {
    return (String) this.productRequirement.getRequestSource();
  }

  /**
   * Set requestSource
   *
   * @parameter String
   */
  public void setRequestSource(String requestSource) {

    this.productRequirement.setRequestSource(requestSource);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductRequirementBean) == false) {
      return false;
    } // end if

    ProductRequirementBean other = (ProductRequirementBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductRequirement tempProductRequirement =
        other.convertToProductRequirement();

    if (tempProductRequirement == null || this.productRequirement == null) {
      isEqual = false;
    } else if (tempProductRequirement == this.productRequirement
        || tempProductRequirement.equals(this.productRequirement)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductRequirementBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirement[] aProductRequirements) {

    return toArray(aProductRequirements, null);
  }

  public static ProductRequirementBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirement[] aProductRequirements,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductRequirements)) {
      return new ProductRequirementBean[0];
    }

    int length = aProductRequirements.length;

    ProductRequirementBean[] beans = new ProductRequirementBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductRequirementBean(aProductRequirements[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductRequirements[i]});
      }
    }

    return beans;
  }
}
